//package com.github.baichuan.web.infrastructure.controller;
//
//import com.github.baichuan.mapping.BeanMapper;
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.data.domain.Page;
//import org.springframework.http.ResponseEntity;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//
//@RestController
//@Tag(name = "用户操作审计")
//@RequestMapping("/audit")
//public class AuditController {
//
//    @Autowired
//    private OperationAuditRepository auditRepository;
//
//    @PostMapping("/query")
//    @Operation(summary = "查询操作日志")
//    public ResponseEntity query(@RequestBody @Validated PaginationCriteria<AuditQueryCriteria> paginationCriteria) {
//        Page<AuditGridView> page = auditRepository.query(paginationCriteria.getCriteria(), paginationCriteria.pageable(AuditGridView.class))
//                .map(x -> BeanMapper.map(x, AuditGridView.class));
//        return ResponseEntity.ok(Pagination.of(page));
//    }
//}
